<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Welcome extends CI_Controller {
        function __construct()
        {
            parent::__construct();
            $this->load->model('modelo');
        }
	public function index()
	{
            $this->load->view('login');
	}
        function Login()
        {
            $nickname = $this->input->post('nickname');
            $clave = md5($this->input->post('clave'));
            
            $numero = $this->modelo->consulta($nickname,$clave)->num_rows();
            $msj="false";
            if($numero >0):
                $msj="true";
            endif;
            echo json_encode(array("msj"=>$msj));
        }
        function cargaRegistro()
        {
            $this->load->view('registro');
        }
}

/* End of file welcome.php */
/* Location: ./application/controllers/welcome.php */